home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Interactive CD Sampler / Microsoft Interactive CD Sampler.iso / DEMOS / C_Automp / AUTOTP / IMD.CST / 00010.ls < prev    next >
Encoding:
Text File  |  1996-07-16  |  1.3 KB  |  35 lines

  1. on setCur x,y,cur,reg
  2.   -- Copyright 1995 Interactive Media Design, Inc.
  3.   -- this routine establishes custom cursors for various sprites. 
  4.   -- x & y values are start sprite number and end sprite number that
  5.   -- are affected. x may be substituted for a list. ie. [2,7,9] in
  6.   -- this case, y is ignored, but must have a value in that position.
  7.   -- cur - the cursor to be set. They are:
  8.   -- hand, left, right, video, mag, sound, and return
  9.   -- reg - used for tracking what cursors have been set. Value is 1 or 2.
  10.   -- Default value is 2. spriteCur1 list is used for tracking cursors set
  11.   -- within a small section. ie. a few frames. spriteCur2 is used for cursors
  12.   -- that are set for the duration of the movie.
  13.   global spriteCur1, spriteCur2, myCursors, spriteCurTool, spriteCurCust
  14.   if voidP(reg) then
  15.     set reg = 2
  16.   end if
  17.   if reg = "tool" then
  18.     set curList = value("spriteCurTool")
  19.   else if reg = "cust" then
  20.     set curList = value("spriteCurCust")
  21.   else
  22.     set curList = value("spriteCur" & reg)
  23.   end if
  24.   if listP(x) then
  25.     repeat with z in x
  26.       set the cursor of sprite z = getaProp(myCursors,value("#" & cur))
  27.       add value(curList), z
  28.     end repeat
  29.   else
  30.     repeat with z = x to y
  31.       set the cursor of sprite z = getaProp(myCursors,value("#" & cur))
  32.       add value(curList), z
  33.     end repeat
  34.   end if
  35. end